package org.example.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhx
 * @since 2025-01-17
 */
@TableName("content_tag_relation")
public class ContentTagRelation implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 关联ID，自增整数，作为主键，唯一标识每条内容与标签的关联记录
     */
    @TableId(value = "relation_id", type = IdType.AUTO)
    private Integer relationId;

    /**
     * 内容ID，整数类型，不能为空，作为外键关联社区内容表，标识关联的内容
     */
    @TableField("content_id")
    private Integer contentId;

    /**
     * 标签ID，整数类型，不能为空，作为外键关联话题标签表，标识关联的标签
     */
    @TableField("tag_id")
    private Integer tagId;

    public Integer getRelationId() {
        return relationId;
    }

    public void setRelationId(Integer relationId) {
        this.relationId = relationId;
    }
    public Integer getContentId() {
        return contentId;
    }

    public void setContentId(Integer contentId) {
        this.contentId = contentId;
    }
    public Integer getTagId() {
        return tagId;
    }

    public void setTagId(Integer tagId) {
        this.tagId = tagId;
    }

    @Override
    public String toString() {
        return "ContentTagRelation{" +
            "relationId=" + relationId +
            ", contentId=" + contentId +
            ", tagId=" + tagId +
        "}";
    }
}
